/*
 * Copyright (c) 2018-2999 北京小象智慧信息科技有限公司 All rights reserved.
 *
 * https://www.xiaoxiangai.com/
 *
 * 未经允许，不可做商业用途！
 *
 * 版权所有，侵权必究！
 */

package com.yami.shop.dao;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yami.shop.bean.dto.SearchProdDto;
import com.yami.shop.bean.model.ShopDetail;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yami.shop.common.util.PageAdapter;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ShopDetailMapper extends BaseMapper<ShopDetail> {

    Integer getIsDistributionByShopId(Long shopId);

    List<ShopDetail> selectAll();

    List<ShopDetail> selectByAgentId(Long agentId);

    List<ShopDetail> listShopDetailByOrderParam(@Param("adapter") PageAdapter adapter, @Param("lat") double lat,@Param("lng") double lng);

    Long countAccount( @Param("lat") double lat,@Param("lng") double lng);

    ShopDetail selectByMobile(String mobile);

    ShopDetail selectByIdCard(String idCard);

    ShopDetail selectAuthorityShop(@Param("lat") double lat,@Param("lng") double lng);

    IPage<ShopDetail> getSearchShopPageByProdName(Page page, @Param("shopName") String shopName, @Param("sort") Integer sort, @Param("orderBy") Integer orderBy, @Param("lat") double lat,@Param("lng") double lng);

    List<ShopDetail> selectAllDetail();

    List<ShopDetail> getAllBranchStore(Long shopId);

    String getLoginName(Long shopId);

    String getLoginNameByMobile(String mobile);

    Long getShopIdBySysUserName(String userName);
}
